#include "AirStripStack.h"

const std::string AirStripStack::defaul_path = "AirStripStack";

AirStripStack::AirStripStack(const std::string & file_path, int max_size) :
air_strip_stack(file_path, max_size)
{
	air_strip_stack.crear();
}

AirStripStack::~AirStripStack()
{
}

unsigned long AirStripStack::pop()
{
	return air_strip_stack.desapilar();
}

void AirStripStack::push(unsigned long an_air_strip)
{
	air_strip_stack.apilar(an_air_strip);
}

void AirStripStack::init(AirStripStack& a_stack)
{
	PilaCompartida<unsigned long>::inicializarSemaforos(a_stack.air_strip_stack);
	for(int i=1; i <= a_stack.air_strip_stack.get_cant_elem_max(); ++i)
		a_stack.push(static_cast<unsigned long>(i));
}
